package com.ruoyi.prod.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import com.ruoyi.prod.enums.AuditState;
import com.ruoyi.prod.enums.PurchaseState;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 采购管理-采购计划
 * </p>
 *
 * @author 强子初
 * @since 2023-02-17
 */
@ApiModel(value = "ProdPurchase对象", description = "采购管理-采购计划")
@Getter
@Setter
@TableName("prod_purchase")
public class ProdPurchase extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty("申请单号")
    @TableField("odd")
    private String odd;

    @ApiModelProperty("固定资产类别编号")
    @TableField("asset_type_id")
    private String assetTypeId;

    @ApiModelProperty("固定资产类别名称")
    @TableField("asset_type_name")
    private String assetTypeName;

    @ApiModelProperty("资产名称")
    @TableField("name")
    private String name;

    @ApiModelProperty("规格型号")
    @TableField("model")
    private String model;

    @ApiModelProperty("单位")
    @TableField("unit")
    private String unit;

    @ApiModelProperty("购置数量")
    @TableField("number")
    private Integer number;

    @ApiModelProperty("价格")
    @TableField("price")
    private BigDecimal price;

    @ApiModelProperty("备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty("购买状态")
    @TableField(exist = false)
    private PurchaseState purchaseState;

    @ApiModelProperty("审核状态")
    @OrderBy(sort = 5, asc = true)
    @TableField("audit_state")
    private AuditState auditState;

    @ApiModelProperty("审核状态集合")
    @TableField(exist = false)
    private List<AuditState> stateList;
}
